Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk, memory card or USB flash drive for initial use. In some cases, the formatting operation may also create one or more new . The first part of the formatting process that performs basic medium preparation is often referred to as "low-level formatting". Partitioning is the common term for the second part of the process, dividing the device into several sub-devices and, in some cases, writing information to the device allowing an operating system to be booted from it. The third part of the process, usually termed "high-level formatting" most often refers to the process of generating a new file system. In some operating systems all or parts of these three processes can be combined or repeated at different levels and the term "format" is understood to mean an operation in which a new disk medium is fully prepared to store Computer file. Some formatting utilities allow distinguishing between a quick format, which does not erase all existing data and a long option that does erase all existing data.
As a general rule, formatting a disk by default leaves most if not all existing data on the disk medium; some or most of which might be recoverable with privilegedE.g., AMASPZAP in MVS or Data recovery. Special tools can remove user data by a single Data erasure of all files and free space.
Modern hard disk drives, such as Serial attached SCSI (SAS)"The LBAs on a logical unit shall begin with zero and shall be contiguous up to the last logical block on the logical unit"., Information technology — Serial Attached SCSI - 2 (SAS-2), INCITS 457 Draft 2, May 8, 2009, chapter 4.1 Direct-access block device type model overview. and Serial ATA (SATA)ISO/IEC 791D:1994, AT Attachment Interface for Disk Drives (ATA-1), section 7.1.2 drives, appear at their interfaces as a contiguous set of fixed-size blocks; for many years 512 bytes long but beginning in 2009 and accelerating through 2011, all major hard disk drive manufacturers began releasing hard disk drive platforms using the Advanced Format of 4096 byte logical blocks.
generally only used fixed block sizes but these sizes were a function of the host's Operating System and its interaction with its controller so that a particular type of media (e.g., 5¼-inch DSDD) would have different block sizes depending upon the host OS and controller.
generally only use fixed block sizes.
For a standard 1.44 MB floppy disk, low-level formatting normally writes 18 Disk sector of 512 to each of 160 tracks (80 on each side) of the floppy disk, providing 1,474,560 bytes of storage on the disk.
Physical sectors are actually larger than 512 bytes, as in addition to the 512 byte data field they include a sector identifier field, CRC bytes (in some cases error correction bytes) and gaps between the fields. These additional bytes are not normally included in the quoted figure for overall storage capacity of the disk.
Different low-level formats can be used on the same Recording medium; for example, large records can be used to cut down on inter-record gap size.
Several freeware, shareware and free software programs (e.g. GParted, Fdformat, NFORMAT, VGA-Copy and 2M) allowed considerably more control over formatting, allowing the formatting of high-density 3.5" disks with a capacity up to 2 MB.
Techniques used include:
Linux supports a variety of sector sizes, and DOS and Windows support a large-record-size DMF-formatted floppy format.
After establishing the structure of tracks, a formatter also needs to fill the entire floppy and look for . Traditionally, the physical sectors were initialized with a fill value of 0xF6 as per the INT 1Eh's Disk Parameter Table (DPT) during format on IBM compatible machines. This value is also used on the Atari Portfolio. CP/M 8-inch floppies typically came pre-formatted with a value of 0xE5, (xviii+856+vi pages, 3.5"-floppy) Errata: [1]
target="_blank" rel="nofollow">[2] and by way of Digital Research this value was also used on Atari ST and some Amstrad formatted floppies. Amstrad otherwise used 0xF4 as a fill value.
User-instigated low-level formatting (LLF) of hard disk drives was common for minicomputer and personal computer systems until the 1990s. IBM and other mainframe system vendors typically supplied their hard disk drives (or media in the case of removable media HDDs) with a low-level format. Typically this involved subdividing each track on the disk into one or more blocks which would contain the user data and associated control information. Different computers used different block sizes and IBM notably used variable block sizes but the popularity of the IBM PC caused the industry to adopt a standard of 512 user data bytes per block by the middle 1980s.
Depending upon the system, low-level formatting was generally done by an operating system utility. IBM compatible PCs used the BIOS, which is invoked using the MS-DOS debug program, to transfer control to a routine hidden at different addresses in different BIOSes. Using DEBUG to Start a Low-Level Format, Microsoft
ATA does not expose a low-level format functionality, but they allow the sector size to be changed via ( in [[hdparm]]). (Consumer drives usually only support 512 and Advanced Format.) Although sector-size change may scramble data, it is not a safe way of erasing data, nor is any certification done. ATA offers a separate ( in [[hdparm]]) command for erasure.
NVMe drives have a standard method of formatting, available in, for example, the Linux command-line program . Sector size change and secure erase options are available. Note that NVMe drives are generally solid-state, making this "track" distinction useless.
Seagate Technology drives offer a TTL serial debugging console. Among other things, the console can format the "system" and "user" partitions while performing defect checks (re-initialization over pre-established logical blocks) and modify track parameters (managing the real low-level format). older version available from
In modern times, it is most common to fill hard drives with value of 0x00. One popular method for performing this zero-fill operation on a hard disk is by writing zero-value bytes to the drive using the Unix dd utility with the /dev/zero stream as the input file and the drive itself (or a specific partition) as the output file. This command may take many hours to complete, and will erase all files and file systems.
A value of 0xFF is used on flash disks to reduce wear . The latter value is typically also the default value used on ROM disks (which cannot be reformatted). Some advanced tools allow configuring the fill value.
Zero-filling a drive is not a secure method of preparing a drive for use with an encrypted filesystem. Doing so voids the plausible deniability of the process, as the encrypted areas (indistinguishable from random without a key, unless the cipher is compromised) will stand out among zero blocks. The correct technique is to zero-fill inside a temporary encrypted layer then discard the key and layer setup. (/dev/urandom provides similar safety, but tends to be slow.) Quickly fill a disk with random bits
Note: whatever possible misuse of such terms may exist, many sites do make such reinitialization utilities available (possibly as bootable floppy diskette or CD image files), to both overwrite every byte and check for damaged sectors on the hard disk.
On MS-DOS, Microsoft Windows, and UNIX-based operating systems (such as BSD, Linux and macOS) this is normally done with a partition editor, such as fdisk, GNU Parted, or Disk Utility. These operating systems support multiple partitions.
Floppy disks are not partitioned; however depending upon the OS they may require volume information in order to be accessed by the OS.
and ICKDSF today do not handle low-level functions for HDDs and optical disc drives such as writing timing marks, and they cannot reinitialize a modern disk that has been degaussed or otherwise lost the factory formatting.
IBM operating systems derived from CP-67, e.g., z/VM, maintain partitioning information for minidisks externally to the drive.
Formatting an entire logical drive or partition may optionally scan for defects, which may take considerable time.
In the case of floppy disks, both high- and low-level formatting are customarily performed in one pass by the disk formatting software. Eight-inch floppies typically came low-level formatted and were filled with a format filler value of 0xE5. Since the 1990s, most 5.25-inch and 3.5-inch floppies have been shipped pre-formatted from the factory as DOS FAT12 floppies.
In current IBM mainframe operating systems derived from OS/360 and DOS/360, such as z/OS and z/VSE, formatting of drives is done by the INIT command of the ICKDSF utility. These OSs support only a single partition per device, called a volume. The ICKDSF functions include writing a Record 0 on every track, writing IPL text, creating a volume label, creating a Volume Table of Contents (VTOC) and, optionally, creating a VTOC index (VTOCIX); high level formatting may also be done as part of allocating a file, by a utility specific to a file system or, in some older access methods, on the fly as new data are written. In z/OS Unix System Services, there are three distinct levels of high-level formatting:
In IBM operating systems derived from CP-67, formatting a volume initializes track 0 and a dummy VTOC. Guest operating systems are responsible for formatting minidisks; the CMS FORMAT command formats a CMS file system on a CMS minidisk.
Reformatting often carries the implication that the operating system and all other software will be reinstalled after the format is complete. Rather than fixing an installation suffering from malfunction or security compromise, it may be necessary to simply reformat everything and start from scratch. Various colloquialisms exist for this process, such as "wipe and reload", "nuke and pave", "reimage", etc. However, reformatting a drive containing only user data does not require reinstallation of the OS.
Unconditional format: There is also the /U parameter that performs an unconditional format which under most circumstances overwrites the entire partition, preventing the recovery of data through software. Note however that the /U switch only works reliably with floppy diskettes (see image to the right). Technically because unless /Q is used, floppies are always low level formatted in addition to high-level formatted. Under certain circumstances with hard drive partitions, however, the /U switch merely prevents the creation of unformat information in the partition to be formatted while otherwise leaving the partition's contents entirely intact (still on disk but marked deleted). In such cases, the user's data remain ripe for recovery with specialist tools such as EnCase or . Reliance upon /U for secure overwriting of hard drive partitions is therefore inadvisable, and purpose-built tools such as DBAN should be considered instead.
Overwriting: In Windows Vista and upwards the non-quick format will overwrite as it goes. Not the case in Windows XP and below.
OS/2: Under OS/2, format will overwrite the entire partition or logical drive if the /L parameter is used, which specifies a long format. Doing so enhances the ability of CHKDSK to recover files.
Some Unix and Unix-like operating systems have higher-level formatting tools, usually for the purpose of making disk formatting easier and/or allowing the user to partition the disk with the same tool. Examples include GNU Parted (and its various GUI frontends such as GParted and the KDE Partition Manager) and the Disk Utility application on Mac OS X.
From the perspective of preventing the recovery of sensitive data through recovery tools, the data must be completely overwritten (every sector), either by a separate tool, or during formatting. Data are destroyed in DOS, OS/2, and Windows when the /L (long) option is used on format and always for a Partitioned Data Set (PDS) in MVS and for newer file systems on IBM mainframes.
It is disputed whether one pass of zero-fill is enough to destroy sensitive data on older (until 1990s) magnetic storage: Gutmann (known for his 35-pass Gutmann method) claims that magnetic force microscopy may be able to "see" old bits on a floppy,Gutmann, Peter. (July 22–25, 1996) Secure Deletion of Data from Magnetic and Solid-State Memory. University of Auckland Department of Computer Science. Epilogue section. but the sources he cited does not prove such. Random fill is believed to be stronger than a fixed pattern fill. One pass of zero fill is sufficient to prevent data remanence, according to NIST (2014) and Wright et al (2008). The Secure Erase option built into hard drives is considered trustworthy, Created: 2011.02.21, updated: 2013.04.02. with the caveat that early solid state drives are known to mis-implement the function.
Degaussing is effective without controversy; however, this may render the drive unusable.
|
|